package models

import (
	"encoding/json"
	"time"
)

type SubTask struct {
	ID        int `json:"id"`
	TID       int
	UID       int
	Executor  string    `json:"executor,omitempty"`
	CreatedAt time.Time `json:"createdAt"`
}

func (t *SubTask) MarshalJSON() ([]byte, error) {
	return json.Marshal(struct {
		Executor  string    `json:"executor,omitempty"`
		CreatedAt time.Time `json:"createdAt"`
	}{t.Executor, t.CreatedAt})
}
